package dk.aiszone.lang.sql.interfaces;

import dk.aiszone.lang.sql.SQLResult;

/**
 * Commmon interface implemented by all SQL objects.
 * 
 * @author Ais
 */
public interface SQLObject {

    /**
     * This method is called once the SQL structure has completely created.<br>
     * The method is called on each <code>SQLObject</code> instance in the structure.<br>
     * The job of this method is to convert as much of the structure as possible into <code>Strings</code>,<br>
     * so as much of the structure as possible only needs pasrsing once.<br>
     * 
     * @see SQLResult
     * @param sql
     *            The <code>SQLResult</code> containing the prepared result of the <code>SQLObject</code>.
     * @return Conviniently just returns the same sql instance again.
     */
    public abstract SQLResult prepareSQL(SQLResult sql);

}
